<?php
declare(strict_types=1);
namespace App\One;
use App\Controller;
use Field\OneCampaignConst;

// hook controller_one_search_campaign_group_use.php

/**
 * @title   计划类型
 * @auth    true
 * @login   true
 * @menu    false
 * @component   vlist/index.vue
 * @icon    el-icon-menu
 * @active  true
 * @affix   false
 * @rank    99
 */
class Index extends Controller
{
    // hook controller_one_search_campaign_group_public_start.php



    // hook controller_one_search_campaign_group_public_end.php

    /**
     * @title  下发配置
     * @rank    0
     */
    public function action_Conf_PUT()
    {
        // hook controller_one_search_campaign_group_conf_start.php
        $TypeID = $this->request->param('TypeID',"");
        $Tabs = [];
        switch ($TypeID){
            case 'onebpsearch';
                $Tabs=[
                    'CampaignGroup'=>true,
                    'Campaign'=>true,
                    'AdGroup'=>true,
                    'KeyWord'=>true,
                    'Crowd'=>true,
                    'AdZone'=>true,
                    'Creative'=>true,
                ];
            break;
            case 'onebpdisplay';
                $Tabs=[
                    'CampaignGroup'=>true,
                    'Campaign'=>true,
                    'AdGroup'=>true,
                    'Crowd'=>true,
                    'AdZone'=>true,
                    'Creative'=>true,
                ];
            break;
            case 'product':
            case 'consumer':
                $Tabs=[
                    'CampaignGroup'=>true,
                    'Campaign'=>true,
                    'AdGroup'=>true,
                    'Crowd'=>true,
                    'Creative'=>true,
                ];
                break;
            case 'onebpsite';
            case 'onebpmultiaim';
                $Tabs=[
                    'Campaign'=>true,
                    'AdGroup'=>true,
                    'Crowd'=>true
                ];
            break;
        }


        // hook controller_one_search_campaign_group_conf_end.php
        $this->response('0000', ['Tabs' =>$Tabs]);
    }
    /**
     * @title  下发列配置
     * @rank    0
     */
    public function action_Columns_GET()
    {
        $data=[
            'columns'=> $this->public_columns
        ];

        $this->response('0000',$data);
    }
     /**
     * @title  修改列配置
     * @rank    0
     */
    public function action_Columns_POST()
    {

        $this->response('0000');
    }

    // hook controller_one_search_campaign_group_end.php
}

?>